<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: rgb(196, 36, 36);
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <input type="file" name="" id="" style="display: none;">
    <button>按钮</button>
</body>
<script src="../lib/jquery.min.js"></script>
<script>
    $(function(){
        $("button").click(function(){
            $("input").click()
        })
        $(".box").click(function(){
            alert("盒子被点击了")
        })
        // $(".box").mouseover(function(){
        //     $(this).css("background-color","blue")
        // })
        // $(".box").mouseout(function(){
        //     $(this).css("background-color","red")
        // })
        $(".box").hover(
            function(){
                $(this).css("background-color","blue")
            },
            function(){
                $(this).css("background-color","red")
},

        )
    })
</script>
</html>